﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace KeyboardArg
{
    /// <summary>
    /// 发送消息类型
    /// </summary>
    public enum SendMessageType : int
    {
        Request = 0,
        Response = 1,
        Exit = 2,
    }

    [DataContract]
    public class KeyBoardArgs
    {
        /// <summary>
        /// 消息传送类型
        /// </summary>
        [DataMember]
        public SendMessageType PassageType { get; set; }

        /// <summary>
        /// 消息发送者的名称
        /// </summary>
        [DataMember]
        public string SenderName { get; set; }

        /// <summary>
        /// 消息发送窗口的句柄
        /// </summary>
        [DataMember]
        public IntPtr SenderHandle { get; set; }

        /// <summary>
        /// 消息接受者的句柄
        /// </summary>
        [DataMember]
        public IntPtr MsgReceiver { get; set; }

        /// <summary>
        /// 是否非空
        /// </summary>
        [DataMember]
        public bool NotNull { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [DataMember]
        public string Title { get; set; }

        /// <summary>
        /// 输入内容（如：龙华区）
        /// </summary>
        [DataMember]
        public string Content { get; set; }

        /// <summary>
        /// 全部输入路径（如：中国广东省深圳市龙华区）
        /// </summary>
        [DataMember]
        public string FullContent { get; set; }

        /// <summary>
        /// 最大输入长度
        /// </summary>
        [DataMember]
        public int MaxLength { get; set; }

        /// <summary>
        /// 发送者包含的关键字: 用于判断启用何种键盘
        /// </summary>
        [DataMember]
        public string Key { get; set; }

        /// <summary>
        /// 回复消息中包含的代码: 用于关联对象
        /// </summary>
        [DataMember]
        public string Code { get; set; }

        /// <summary>
        /// 消息返回的处理命令，备用
        /// </summary>
        [DataMember]
        public string Command { get; set; }

        /// <summary>
        /// 语音路径
        /// </summary>
        [DataMember]
        public string VoiceFileName { get; set; }

        /// <summary>
        /// 字典文件名，只对选择键盘有用，只传文件名即可，自动找目录路径及根据语言匹配文件名，如city_en.xml;city_cn.xml，该参数统一传city即可
        /// </summary>
        [DataMember]
        public string DictionaryFileName { get; set; }

        [DataMember]
        public string LanguageCode { get; set; }

        //自定义标签值
        [DataMember]
        public string Tag { get; set; }

        [DataMember]
        public Rectangle ScreenWorkArea { get; set; }
    }
}
